home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
bioinformatics.org
/
bioinformatics.org_software.tar
/
www.bioinformatics.org
/
download
/
ecell2
/
ecell220setup.exe
/
{app}
/
standard
/
SRCJ
/
ExtensionFilter.java
< prev
next >
Wrap
Text File
|
2002-05-13
|
1KB
|
59 lines
/**
* title: ExtensionFilter class (ExtensionFilter.java)<p>
* description : Controller Panel class <p>
* Copyright (C) 1996-2001 Keio University <p>
* Copyright (C) 1998-2001 Japan Science and Technology Corporation (JST)<p>
* GNU General Public Licence <p>
* Division: Mitui Knowledge Industry Co. Ltd. Bioscience division <p>
* Version : $Id: ExtensionFilter.java,v 1.4 2002/05/13 00:23:04 ota Exp $ <p>
*/
package ecell;
import java.io.*;
public class ExtensionFilter implements FilenameFilter
{
private String extension = "";
private String path = ".";
private File f = null;
public ExtensionFilter( String path, String ext )
{
if( path != null && !path.equals( "" ) )
{
this.path = path;
}
this.f = new File( this.path );
this.setExtension( ext );
}
public String[] list()
{
return f.list( this );
}
public synchronized boolean accept( File dir, String name )
{
return name.endsWith( this.extension );
}
public String getExtension()
{
return extension;
}
public void setExtension( String ext )
{
this.extension = ext;
}
}